import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        String magicToken = scanner.nextLine();
        String reversedToken = new StringBuilder(magicToken).reverse().toString();
        reversedToken.chars()
                .map(it -> it ^ 1104)
                .forEach(it -> System.out.print(it + "O"));
    }
}

